home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- supermodel.class/--datasheet--
- supermodel.class/--datasheet-GlueFunc--
- supermodel.class/--datasheet-supericclass--
- supermodel.class/--History--
- supermodel.class/ProcessTagList
- supermodel.class/SM_IsMemberOf
- supermodel.class/SM_NewSuperIC
- supermodel.class/SM_NewSuperModel
- supermodel.class/SM_SendGlueAttrs
- supermodel.class/SM_SICMAP
- supermodel.class/SMTAG_AddTag
- supermodel.class/SMTAG_AddTags
- supermodel.class/SMTAG_AllocTags
- supermodel.class/SMTAG_ClearNumTags
- supermodel.class/SMTAG_ClearTags
- supermodel.class/SMTAG_FreeTags
- supermodel.class/SMTAG_RemTag
- supermodel.class/SMTAG_TagDone
- supermodel.class/SMTAG_TagMore
- supermodel.class/--datasheet-- supermodel.class/--datasheet--
-
- NAME
- supermodel.class -- Model and IC class
-
- SUPERCLASS
- modelclass
-
- DESCRIPTION
-
-
- METHODS
-
-
- ATTRIBUTES
- SMA_AddMember - calls OM_ADDMEMBER
-
- SMA_RemMember - calls OM_REMMEMBER
-
- SMA_GlueFunc - Glue code, does tag mapping/conversion, etc.
- See example.
- see --datasheet-GlueFunc--
-
- SMA_GlueFuncA6 - If your glue code is in a library, set this to
- your Library base.
-
- SMA_GlueFuncUserData -
-
- SMA_CacheStringTag - cache string data
-
- icclass Tags supported also
-
- NOTES
-
- BUGS
- Doesn't fail if SMA_AddMember is NULL during OM_NEW.
- It will in the future.
-
- SEE ALSO
-
- supermodel.class/--datasheet-GlueFunc--upermodel.class/--datasheet-GlueFunc--
-
- NAME
- GlueFunc
-
- SYNOPSIS
- rv GlueFunc(GlueData, TagList, [userdata], [a6])
- d0 a0 a1 a2 a6
-
- ULONG GlueFunc(struct smGlueData *, struct TagItem *, APTR, APTR);
-
- FUNCTION
- GlueFunc is a function you provide to modify a tag list before
- being sent to the members and ICA_TARGET of the modelclass.
-
- You may modify TagList and use the SMTAG_functions to modify
- TagList, however, don't free TagList.
-
- Call SM_SendGlueAttrsA() to send your new attributes back to the
- model class for notifiaction.
-
- NOTES
- There is room for 50 tags in TagList
-
- BUGS
-
- SEE ALSO
-
- supermodel.class/--datasheet-supericclass--l.class/--datasheet-supericclass--
-
- NAME
- supermodel.class -- IC class
-
- SUPERCLASS
- icclass
-
- DESCRIPTION
- An interconnect object, creates a data path between a supermodel
- object and other objects (usually gadgets)
-
- METHODS
-
- ATTRIBUTES
- SICA_Model - set by model class when addmembered.
-
- ICA_TARGET - target object
-
- You may set either ICA_MAP or SICA_TargetMap or
- (SICA_ToTargetMap and SICA_FromTargetMap)
-
- ICA_MAP - map tags
- The supplied taglist is cloned and applied to the ic object.
- Another taglist is built by reversing the tags and applied to
- the targeted object.
-
- SICA_TargetMap -
- The supplied taglist is cloned and applied to the targeted object.
- Another taglist is built by reversing the tags and applied to
- the ic object.
-
- SICA_ToTargetMap - Applied to tags sent from the
- ic object to the targeted object.
-
- SICA_FromTargetMap - Applied to tags sent from the
- targeted object to, likely, the modelobject
-
-
- NOTES
- if ICA_TARGET is valid,
- the ic object will set the Target's ICA_TARGET and ICA_MAP.
-
- BUGS
-
- SEE ALSO
-
- supermodel.class/--History-- supermodel.class/--History--
-
- To Do
-
- 44.1 -
- * GlueCode was freeing memory twice.
- * Added SMA_CacheStringTag - Anytime this tag is passed through
- the model class, the string supplied is cached, and ti_Data
- is updated to point to the cache.
- 44.2 -
- * Included version string
- 44.3 -
- * Now failes during OM_NEW if any SMA_AddMember is null.
- * Documentation update.
- * ICA_MAP support in superic was changed
-
- supermodel.class/ProcessTagList supermodel.class/ProcessTagList
-
- NAME
- ProcessTagList -- Macro to process a taglist
-
- SYNOPSIS
- ProcessTagList(TagList, Tag, TState)
-
- TState=TagList;
- while(Tag=NextTagItem(&TState))
-
- EXAMPLE
- void SomeFunc(struct TagItem *TagList)
- {
- struct TagItem *tag, *tstate;
-
- ProcessTagList(TagList,tag,tstate)
- {
- seitch(tag->ti_Tag)
- {
- case GA_Left:
- ...
- break;
- etc...
- }
- }
- }
-
- supermodel.class/SM_IsMemberOf supermodel.class/SM_IsMemberOf
-
- NAME
- SM_IsMemberOf -- Check if Object belongs to a Class
-
- SYNOPSIS
- memberof = SM_IsMemberOf(Object, ClassPtr, ClassID)
-
- BOOL SM_IsMemberOf(Object *, Class *, STRPTR);
-
- FUNCTION
- Determines if the Object is a member of the Class
- specified.
-
- INPUTS
- Object - Object to check.
- ClassPtr - (Class) May be NULL.
- ClassID - (STRPTR) May be NULL.
-
- RESULT
- BOOL, non-zero on succes.
-
- NOTES
- Stolen from someone on the BOOPSI mailing list...
-
- Here's some IsMemberOf() code I whipped up quickly. Might be nice if
- we all
- posted useful little BOOPSI snippets like this... maybe even collected
- them
- together on a web site. (I volunteer NOT to maintain this site :)
-
- supermodel.class/SM_NewSuperIC supermodel.class/SM_NewSuperIC
-
- NAME
- SM_NewSuperIC -- Allocate SuperIC object
-
- SYNOPSIS
- icobject=SM_NewSuperICA(TagList)
- a0 a0
-
- Object *SM_NewSuperICA(struct TagItem *);
-
- icobject=SM_NewSuperIC(Tags, ...)
- a0 a0
-
- Object *SM_NewSuperIC(Tag, ...);
-
- FUNCTION
- Allocates an SuperIC class object
-
- INPUTS
- TagList - see --datasheet-supericclass--
-
- RESULT
- Pointer to an ic object on success, if ICA_TARGET is valid,
- the ic object will set the Target's ICA_TARGET and ICA_MAP.
-
- supermodel.class/SM_NewSuperModel supermodel.class/SM_NewSuperModel
-
- NAME
- SM_NewSuperModel -- Allocate SuperModel object
-
- SYNOPSIS
- model = SM_NewSuperModel( Tag1, Data1, TAg2, ...)
-
- Object *SM_NewSuperModel(Tag Tags, ...);
-
- FUNCTION
- Allocate model object.
-
- INPUTS
- Tags
-
- RESULT
-
- EXAMPLE
-
- NOTES
- DisposeObject() returned model when done.
-
- Before targeted objects (ie gadgets) are freed you must either:
- 1. Dispose() the SuperModel object, which also Dispose()s all
- SuperIC objects.
- 2. SetAttr() ICA_TARGET to NULL on every SuperIC object.
- SuperIC objects need to clear the ICA_MAP and ICA_TARGET settings
- of it's targetted object. If the target object nolonger exists,
- expect bad things to happen.
-
- BUGS
-
- SEE ALSO
-
- supermodel.class/SM_SendGlueAttrs supermodel.class/SM_SendGlueAttrs
-
- NAME
- SM_SendGlueAttrs -- Send attributes from GlueFunc (SMA_GlueFunc)
-
- SYNOPSIS
- unknown = SM_SendGlueAttrs(GlueData, TagList)
- d0 a0 a1
-
- ULONG SM_SendGlueAttrs(struct smGlueData *, struct TagItem *);
-
- FUNCTION
- This function sends TagList back to the modelclass for notification
- of other objects.
-
- ONLY to be called from inside a GlueFunction.
-
- INPUTS
- GlueData -
- TagList -
-
- RESULT
-
- EXAMPLE
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
- supermodel.class/SM_SICMAP supermodel.class/SM_SICMAP
-
- NAME
- SM_SICMAP -- Builds and super ic class object
-
- SYNOPSIS
- icobject SM_SICMAPA(Target, MapTags)
- a0 a0 a1
-
- Object *SM_SICMAPA(Object *, struct TagItem *);
-
- icobject=SM_SICMAP(Target, MapTags, ...)
- a0 a0 a1
-
- Object *SM_SICMAP(Object *, Tag, ...);
-
- FUNCTION
- Simplfied way to create and SuperIC object.
- Target is targeted object of the ic object.
- MapTags, target map tags.
-
- INPUTS
-
- RESULT
-
- EXAMPLE
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
- supermodel.class/SMTAG_AddTag supermodel.class/SMTAG_AddTag
-
- NAME
- SMTAG_AddTag -- Add a tag toa taglist.
-
- SYNOPSIS
- ok = SMTAG_AddTag(TagList, Tag, Data)
-
- BOOL SMTAG_AddTag(struct TagItem *, ULONG, ULONG);
-
- FUNCTION
- Add a tag pair to a taglist created with SMTAG_AllocTags()
-
- INPUTS
- TagList - TagList created with SMTAG_AllocTags()
- Tag - ti_Tag value
- Data - ti_Data value
-
- RESULT
- non zero if the tag was added.
- failure can be due to under sized taglist.
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- NOTES
- Don't SMTAG_AddTag TAG_IGNORE, TAG_DONE, TAG_MORE, TAG_SKIP.
- This function will only effect the specified TagList, and
- not any other lists referenced by TAG_MORE.
- This function overwrites existing same tags.
-
- SEE ALSO
- SMTAG_AllocTags()
-
- supermodel.class/SMTAG_AddTags supermodel.class/SMTAG_AddTags
-
- NAME
- SMTAG_AddTags -- Add a taglist to a taglist.
-
- SYNOPSIS
- ok = SMTAG_AddTags(TagList, Tag, Data)
-
- BOOL SMTAG_AddTags(struct TagItem *, ULONG, ULONG);
-
- FUNCTION
- Add a taglist to a taglist created with SMTAG_AllocTags()
-
- INPUTS
- TagList - TagList created with SMTAG_AllocTags()
- NewTags - Tags to add to TagList
-
- RESULT
- non zero if the tag was added.
- failure can be due to under sized taglist.
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- NOTES
- This function will only effect the specified TagList, and
- not any other lists referenced by TAG_MORE.
- This function overwrites existing same tags.
-
- SEE ALSO
- SMTAG_AllocTags()
-
- supermodel.class/SMTAG_AllocTags supermodel.class/SMTAG_AllocTags
-
- NAME
- SMTAG_AllocTags -- Allocate blank Tag List
-
- SYNOPSIS
- taglist = SMTAG_AllocTags(TagCount)
-
- struct TagItem *SMTAG_AllocTags(ULONG);
-
- FUNCTION
- Allocate tag space for use with other SMTAG_? functions.
-
- INPUTS
- TagCount - Number of blank tags to allocate.
-
- RESULT
- An empty tag space ending with TAG_DONE, or NULL.
-
- EXAMPLE
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
- supermodel.class/SMTAG_ClearNumTags supermodel.class/SMTAG_ClearNumTags
-
- NAME
- SMTAG_ClearTags -- Clear a TagList
-
- SYNOPSIS
- void SMTAG_ClearTags(TagList, TagCount)
-
- SMTAG_ClearTags(struct TagItem *, ULONG);
-
- FUNCTION
- Clears the TagList of all data.
-
- INPUTS
- TagList - Allocated with SMTAG_AllocTags()
- TagCount - Number of blank tags to allocate.
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- NOTES
- This function is called by SMTAG_AllocTags(), so
- the taglist is cleared when allocated.
- This function will only effect the specified TagList, and
- not any other lists referenced by TAG_MORE.
-
- BUGS
-
- SEE ALSO
- see SMTAG_AllocTags()
-
- supermodel.class/SMTAG_ClearTags supermodel.class/SMTAG_ClearTags
-
- NAME
- SMTAG_ClearTags -- Clear a TagList
-
- SYNOPSIS
- void SMTAG_ClearTags(TagList)
-
- SMTAG_ClearTags(struct TagItem *);
-
- FUNCTION
- Clears the TagList of all data.
-
- INPUTS
- TagList - Allocated with SMTAG_AllocTags()
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- NOTES
- This function will only effect the specified TagList, and
- not any other lists referenced by TAG_MORE.
-
- BUGS
-
- SEE ALSO
- see SMTAG_AllocTags()
-
- supermodel.class/SMTAG_FreeTags supermodel.class/SMTAG_FreeTags
-
- NAME
- SMTAG_FreeTags -- Clear a TagList
-
- SYNOPSIS
- void SMTAG_FreeTags(TagList)
-
- SMTAG_FreeTags(struct TagItem *);
-
- FUNCTION
- Frees the TagList.
-
- INPUTS
- TagList - Allocated with SMTAG_AllocTags().
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- SEE ALSO
- see SMTAG_AllocTags()
-
- supermodel.class/SMTAG_RemTag supermodel.class/SMTAG_RemTag
-
- NAME
- SMTAG_RemTag -- Removea a tag to a taglist.
-
- SYNOPSIS
- ok = SMTAG_RemTag(TagList, Tag)
-
- BOOL SMTAG_RemTag(struct TagItem *, ULONG);
-
- FUNCTION
- Find and remove a tag from a taglist.
-
- INPUTS
- TagList - TagList created with SMTAG_AllocTags()
- Tag - ti_Tag value
-
- RESULT
- non zero if the tag was found and removed.
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- NOTES
- Don't SMTAG_AddTag TAG_IGNORE, TAG_DONE, TAG_MORE, TAG_SKIP.
- This function will only effect the specified TagList, and
- not any other lists referenced by TAG_MORE.
-
- SEE ALSO
- SMTAG_AllocTags()
-
- supermodel.class/SMTAG_TagDone supermodel.class/SMTAG_TagDone
-
- NAME
- SMTAG_TagDone -- End the TagList with TagDone
-
- SYNOPSIS
- void SMTAG_FreeTags(TagList)
-
- SMTAG_FreeTags(struct TagItem *);
-
- FUNCTION
- Ends the taglist with TAG_MORE and link the list to MoreTags
-
- INPUTS
- TagList - Allocated with SMTAG_AllocTags().
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- SEE ALSO
- see SMTAG_AllocTags()
-
- supermodel.class/SMTAG_TagMore supermodel.class/SMTAG_TagMore
-
- NAME
- SMTAG_TagMore -- End the TagList with TagMore
-
- SYNOPSIS
- void SMTAG_FreeTags(TagList, MoreTags)
-
- SMTAG_FreeTags(struct TagItem *, struct TagItem *);
-
- FUNCTION
- Ends the taglist with TAG_MORE and link the list to MoreTags
-
- INPUTS
- TagList - Allocated with SMTAG_AllocTags().
- MoreTags - Tags to link
-
- EXAMPLE
- see SMTAG_AllocTags()
-
- SEE ALSO
- see SMTAG_AllocTags()
-
-